<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="jQuery/jquery.min.js"></script>
<%-- <script src="jQuery/jquery-ui.min.js"></script> --%>
<script src="jQuery/jquery.easyui.min.js"></script>
<link rel="stylesheet" type="text/css" href="jQuery/themes/icon.css">
<link rel="stylesheet" type="text/css" href="jQuery/demo.css">
<link rel="stylesheet" type="text/css"
	href="jQuery/themes/default/easyui.css">
<script src="css_js/user.js"></script>
<script src="css_js/userlist.js"></script>
<script src="css_js/formatDate.js"></script>
<link rel="stylesheet" type="text/css" href="css_js/user.css" />
</head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

	<p class="flip">点击这里，查看帮助</p>
	<div class="help">点击更新可以跳转到对应用户的更新界面 ,点击删除可以删除对应的用户</div>


	<table id="tt" class="easyui-datagrid" title="Basic DataGrid"
		style="width: 600px; height: auto" toolbar="#tb"
		data-options="
		singleSelect:false,
		collapsible:true,
		url:'User-json',
<!-- 		hideColumn:id, -->
		onClickCell: onClickCell"
		idField="id" rownumbers="true" pagination="true">
		<thead frozen="true">
			<tr>
				<th field="ck" checkbox="true"></th>
				<th field="id" ></th>
				<th field="name" rowspan="2" sortable="true" editor="{type:'validatebox',options:{required:true}}">戶主姓名</th>
				<th field="address" rowspan="2" sortable="true" editor:"text">地址</th>
			</tr>
		</thead>
		<thead>
			<tr>
				<th field="phone" rowspan="2" sortable="true" editor="{type:'numberbox'}">联系电话</th>
				<th field="userType" rowspan="2" formatter="formatType"
					sortable="true">用户类型</th>
				<th field="foundDate" rowspan="2" sortable="true" formatter="formatTime">创建时间</th>
				<th field="notes" rowspan="2" sortable="true">备注</th>
			</tr>
		</thead>
		<!-- <tbody>
			<s:iterator value="users" var="u">
				<tr>
					<td><s:property value="#u.name" /></td>
					<td><s:property value="#u.address" /></td>
					<td><s:property value="#u.phone" /></td>
					<td><span id="id<s:property value='#u.id' />"
						onclick="changeToInput(this.id)"><s:property
								value="#u.userType" /> </span></td>
					<td><s:property value="#u.foundDate" /></td>
					<td><s:property value="#u.notes" /></td>
					<td><a
						href="User-updateInput?user.id=<s:property value='#u.id' />">更新</a></td>
					<td><a onclick="confirm('是否删除')"
						href="User-delete?user.id=<s:property value='#u.id' />" />删除</a></td>
				</tr>
			</s:iterator>
		<tbody>
		 -->
	</table>
	<div id="tb" style="padding: 3px">
		<div style="margin-bottom: 5px">
			<input id="name" class="easyui-textbox" searcher="search" prompt="请输入姓名"> <a
				href="#" class="easyui-linkbutton"  plain="true" iconCls="icon-search" onclick="doSearch()">搜索</a>
			<a href="#" class="easyui-linkbutton" iconCls="icon-remove"
				plain="true" onclick="doDeleteAll()"></a> <a href="#"
				class="easyui-linkbutton" iconCls="icon-add" plain="true"
				onclick="javascript:href='User-addInput')">增加</a> <a href="#"
				class="easyui-linkbutton" iconCls="icon-cut" plain="true"
				onclick="javascript:alert('Cut')">更新</a> <a href="#"
				class="easyui-linkbutton" iconCls="icon-save" plain="true"
				onclick="javascript:alert('Save')">保存</a>
		</div>
		<div>
			Date From: <input class="easyui-datebox" style="width: 80px">
			To: <input class="easyui-datebox" style="width: 80px">
			Language: <input class="easyui-combobox" style="width: 100px" textField="text">
			<a href="#" class="easyui-linkbutton" iconCls="icon-search">Search</a>
		</div>
	</div>
</body>
</html>